package com.factory;

public class BadandGoodStudentFactory {

    public static Istudent getInstance(String name) {
        if (name.equals("good")) {
            return new GoodStudentImpl();
        } else if (name.equals("bad")) {
            return new BadStudentImpl();
        }
        return null;
    }
}
